<template>
  <div class="video-info">
    <video
      controls="controls"
      :src="Video.video.url"
      v-if="Video.video && Video.video.url"
    ></video>
    <div class="v-info">
      <div class="v-title">{{ Video.title }}</div>
      <div
        class="u-info"
        v-if="Video.user && Video.user.avatarurl && Video.user.nickName"
      >
        <img :src="Video.user.avatarurl" />
        <span class="u-name">{{ Video.user.nickName }}</span>
        <img
          v-show="Video.user.identification == 1"
          src="../assets/img/5aaa710d72c78d6553be83f43bc9e4f3946.png"
          class="u-icon"
        />
      </div>
    </div>
  </div>
</template>

<script>
import { mapState } from "vuex";
export default {
  data() {
    return {};
  },
  computed: {
    // 获取Vuex里面的值
    ...mapState(["Video"]),
  },
};
</script>

<style lang="less" scoped>
.video-info {
  video {
    width: 100%;
  }

  .v-info {
    display: flex;
    flex-direction: column;
    padding: 14px 15px 15px;
    background-color: #fff;

    .v-title {
      font-size: 15px;
      color: #333;
      line-height: 22px;
    }

    .u-info {
      display: flex;
      justify-content: start;
      align-items: center;
      margin-top: 8px;

      img {
        width: 22px;
        border-radius: 50%;
      }

      .u-name {
        font-size: 14px;
        margin: 0px 4px 0px 8px;
      }

      .u-icon {
        width: 12px;
        height: 12px;
      }
    }
  }
}
</style>
